/*
 * Copyright (c) 2010 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.api.data.contacts.v3.model;

import com.google.api.client.util.Key;

/**
 * Storage for arbitrary pieces of information about the contact. Each Jot has a
 * type specified by the {@link #type} attribute and a text {@link #value}.
 * 
 * @author Nicolas Garnier
 */
public class Jot {

  /** Used to specify that the Jot is about the home of the contact. */
  public static final String TYPE_HOME = "home";

  /** Used to specify that the Jot is about the work of the contact. */
  public static final String TYPE_WORK = "work";

  /** Used to specify that the Jot is about the contact's other information. */
  public static final String TYPE_OTHER = "other";

  /** Used to specify that the Jot contains keywords. */
  public static final String TYPE_KEYWORDS = "keywords";

  /** Used to specify that the Jot is related to the user in general. */
  public static final String TYPE_USER = "user";

  /**
   * A programmatic value that identifies the type of event. Valid values are
   * {@link #TYPE_HOME}, {@link #TYPE_KEYWORDS}, {@link #TYPE_OTHER},
   * {@link #TYPE_USER} and {@link #TYPE_WORK}.
   */
  @Key("@rel")
  public String type;

  /** The value of the jot. */
  @Key("text()")
  public String value;
}
